package com.czh.www.domain;

import java.net.DatagramSocket;
import java.net.SocketException;

public class SocketManage {
    private static DatagramSocket udpSocket;
    private static SocketManage instance;

    private SocketManage() throws SocketException {
        udpSocket = new DatagramSocket(2425);
    }

    public static SocketManage getInstance() throws SocketException {
        return instance == null ? (instance = new SocketManage()) : instance;
    }

    public DatagramSocket getUdpSocket() {
        return udpSocket;
    }
}
